package com.itheima.test1;

public class PhoneTest {
    public static void main(String[] args) {
        //创建手机的对象
        Phone p1 = new Phone();
        //给手机赋值
        p1.brand = "小米";
        p1.price = 2999;
        //获取手机对象中的值
        System.out.println(p1.brand);
        System.out.println(p1.price);
        //调用方法
        p1.call("张三");
        p1.playGame();

        Phone p2 = new Phone();
        p2.brand = "华为";
        p2.price = 3999;
        System.out.println(p2.brand);
        System.out.println(p2.price);
        p2.call("李四");
        p2.playGame();

    }
}
